﻿<UserControl xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"  x:Class="P_PersonalDetails.PersonalInfo"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:local="clr-namespace:P_PersonalDetails"
    mc:Ignorable="d"
    d:DesignHeight="495" d:DesignWidth="628">
    <UserControl.Resources>
        <ResourceDictionary Source="FormStyling.xaml"/>
    </UserControl.Resources>
    <Border Style="{StaticResource BoxBorder}">
        <StackPanel>
            <TextBlock Style="{StaticResource BoxHeading}">
                <Run Text="Personal Information"/>
            </TextBlock>
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="200"/>
                    <ColumnDefinition Width="*" MaxWidth="300"/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="20"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="20"/>
                    <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <TextBlock Grid.Row="0">First Name</TextBlock>
                <TextBox Grid.Row="0" Grid.Column="1" Margin="2" Text="{Binding FirstName, Mode=TwoWay, ValidatesOnExceptions=True}"/>
                <TextBlock Grid.Row="1">Surname</TextBlock>
                <TextBox Grid.Row="1" Grid.Column="1" Margin="2" Text="{Binding Surname, Mode=TwoWay, ValidatesOnExceptions=True}"/>
                <TextBlock Grid.Row="3">Address Line 1</TextBlock>
                <TextBox Grid.Row="3" Grid.Column="1" Margin="2" Text="{Binding Address1, Mode=TwoWay, ValidatesOnExceptions=True}"/>
                <TextBlock Grid.Row="4">Address Line 2</TextBlock>
                <TextBox Grid.Row="4" Grid.Column="1" Margin="2" Text="{Binding Address2, Mode=TwoWay, ValidatesOnExceptions=True}"/>
                <TextBlock Grid.Row="5">Address Line 3</TextBlock>
                <TextBox Grid.Row="5" Grid.Column="1" Margin="2" Text="{Binding Address3, Mode=TwoWay, ValidatesOnExceptions=True}"/>
                <TextBlock Grid.Row="6">Town</TextBlock>
                <TextBox Grid.Row="6" Grid.Column="1" Margin="2" Text="{Binding Town, Mode=TwoWay, ValidatesOnExceptions=True}"/>
                <TextBlock Grid.Row="7">County</TextBlock>
                <TextBox Grid.Row="7" Grid.Column="1" Margin="2" Text="{Binding County, Mode=TwoWay, ValidatesOnExceptions=True}"/>
                <TextBlock Grid.Row="8">Post Code</TextBlock>
                <TextBox Grid.Row="8" Grid.Column="1" Margin="2" Text="{Binding PostCode, Mode=TwoWay, ValidatesOnExceptions=True}"/>
                <TextBlock Grid.Row="10">Gender</TextBlock>
                <local:GenderPicker Grid.Row="10" Grid.Column="1" Height="30" Width="150" IsMale="{Binding IsMale, Mode=TwoWay, ValidatesOnExceptions=True}"/>
            </Grid>
            <Grid  Margin="0,5,0,5">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="200"/>
                    <ColumnDefinition Width="*" MaxWidth="300"/>
                    <ColumnDefinition Width="3*"/>
                </Grid.ColumnDefinitions>
                <TextBlock>Date of Birth</TextBlock>
                <sdk:DatePicker Grid.Column="1" SelectedDate="{Binding DoB, Mode=TwoWay, ValidatesOnExceptions=True}" />
                <TextBlock Grid.Column="2">(You must supply this if you are applying for junior membership)</TextBlock>
            </Grid>
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition/>
                    <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <CheckBox Grid.Row="0" Grid.Column="1" IsChecked="{Binding TownOptOut, Mode=TwoWay, ValidatesOnExceptions=True}"/>
                <CheckBox Grid.Row="1" Grid.Column="1" IsChecked="{Binding ImageOptOut, Mode=TwoWay, ValidatesOnExceptions=True}"/>
                <TextBlock Style="{StaticResource SubText}" Margin="0,5,0,5">
                    <Run>Please tick this box if you do</Run>
                    <Run TextDecorations="Underline">not</Run>
                    <Run>want the town part of your address circulated to club members.  The rest of your address will not be circulated.</Run>
                </TextBlock>
                <TextBlock Style="{StaticResource SubText}" Grid.Row="1" Margin="0,5,0,5">
                    <Run>Please tick this box if you do</Run>
                    <Run TextDecorations="Underline">not</Run>
                    <Run>consent to images of you participating in Shepperton Slalom Canoe Club activities being used for club publicity, including on the club’s website.</Run>
                </TextBlock>
            </Grid>
        </StackPanel>
    </Border>
</UserControl>
